{% extends "tcms_base.html" %}
{% load static %}
{% block subtitle %}Clone Plan{% endblock %}

{% block custom_stylesheet %}
{% endblock %}

{% block custom_javascript %}
<script type="text/javascript" src="{% static 'js/testplan_actions.js' %}"></script>
<script type="text/javascript">
Nitrate.Utils.after_page_load(Nitrate.TestPlans.Clone.on_load);
</script>
{% endblock %}

{% block contents %}

<div id="content">
	<h2>Clone TestPlan {{ test_plan.name }}</h2>
	<div class="Detailform border-1">
		<form action="{% url "plans-clone" %}" method="post">
			<input type="hidden" name="plan" value="{{ test_plan.pk }}" />
			<table	class="editor" cellspacing="0" cellspan="0"> 
				<tr>
					<td width="20%" ><label class="strong" for="id_name">New Plan Name</label> </td>
					<td class="name" >{{ clone_form.name }}</td>
				</tr>
				<tr >
					<td><label class="strong" for="id_product_id">Copy to Product</label></td>
					<td>{{ clone_form.product }}</td>
				</tr>
				<tr>
					<td><label class="strong" for="id_version_id">Product Version</label></td>
					<td>
						{{ clone_form.product_version }}
						<span class="errors">{{ clone_form.product_version.errors }}</span>
					</td>
				</tr>
				<tr>
					<td><label class="strong">Copy Settings</label> </td>
					<td>
						<ul class="ul-no-format">
							<li>{{ clone_form.set_parent }}{{ clone_form.set_parent.label }} ({{ clone_form.set_parent.help_text }})</li>
							<li>{{ clone_form.keep_orignal_author }}{{ clone_form.keep_orignal_author.label }} ({{ clone_form.keep_orignal_author.help_text }})</li>
							<li>
								<fieldset class="choose">
									<legend>{{ clone_form.link_testcases }}Copy {{ clone_form.link_testcases.label }}</legend>
									<ul id="id_clone_case_zone" style="display:block ;list-style-type:none;">
										<li>{{ clone_form.copy_testcases }}{{ clone_form.copy_testcases.label }} ({{ clone_form.copy_testcases.help_text }})</li>
										<li>{{ clone_form.maintain_case_orignal_author }}{{ clone_form.maintain_case_orignal_author.label }} ({{ clone_form.maintain_case_orignal_author.help_text }})</li>
										<li>{{ clone_form.keep_case_default_tester }}{{ clone_form.keep_case_default_tester.label }} ({{ clone_form.keep_case_default_tester.help_text }})</li>
									</ul>
								</fieldset>
							</li>
						</ul>	
					</td>
				</tr>
			</table>
			<div class="submit-row">
				<input type="submit" name="submit" value="Clone" />
				<input type="button" value="Cancel" class="js-cancel-button" />
			</div>
		</form>
	</div>
</div>
{% endblock %}
